<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let i = 1;
    while (i <= 5) {
      if (i === 2) {
        i++;
        continue; //跳过本次循环，不在执行后面的代码，重新开始下一轮循环
      }
      if (i === 4) {
        break; // 退出整个循环
      }
      console.log(`我准备吃第${i}个鸡腿了`);
      i++;
    }
  </script>
</body>

</html>